package org.jeecg.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 物料预警记录表
 * @Author: jeecg-boot
 * @Date: 2023-07-17
 * @Version: V1.0
 */
@Data
@TableName("wms_material_warning_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="wms_material_warning_log对象", description="物料预警记录表")
public class WmsMaterialWarningLog implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 物料编码
     */
    @Excel(name = "物料编码", width = 15)
    @ApiModelProperty(value = "物料编码")
    private String materialCode;

    /**
     * 物料名称
     */
    @Excel(name = "物料名称", width = 15)
    @ApiModelProperty(value = "物料名称")
    private String materialName;

    /**
     * 预警类型（1-低于下限，2-超过上限）
     */
    @Excel(name = "预警类型", width = 15, dicCode = "material_warning_type")
    @ApiModelProperty(value = "预警类型")
    private Integer warningType;

    /**
     * 当前库存数量
     */
    @Excel(name = "当前库存数量", width = 15)
    @ApiModelProperty(value = "当前库存数量")
    private BigDecimal currentQuantity;

    /**
     * 预警下限
     */
    @Excel(name = "预警下限", width = 15)
    @ApiModelProperty(value = "预警下限")
    private BigDecimal lowerLimit;

    /**
     * 预警上限
     */
    @Excel(name = "预警上限", width = 15)
    @ApiModelProperty(value = "预警上限")
    private BigDecimal upperLimit;

    /**
     * 是否已处理（0-否，1-是）
     */
    @Excel(name = "是否已处理", width = 15, dicCode = "yn")
    @ApiModelProperty(value = "是否已处理")
    private Integer handled;

    /**
     * 关联的采购单ID
     */
    @ApiModelProperty(value = "关联的采购单ID")
    private String purchaseOrderId;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 处理时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "处理时间")
    private Date handleTime;

    /**
     * 处理人
     */
    @ApiModelProperty(value = "处理人")
    private String handleBy;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;
} 